package com.rjet.access_control.socket;

import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * @Author:ethan
 * @Date: 2023/10/13  9:43
 * @Version 1.0.1
 */
@Component
public class UdpService implements CommandLineRunner {
    @Override
    public void run(String... args) throws Exception {
        System.out.println("udp start....");

        try {

            new Thread(new Runnable() {
                @Override
                public void run() {

                    UdpServer udpServer = new UdpServer();
                    udpServer.udp();
                }
            }).start();

        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
